Skip to content

Conversation

Cynicjon
Copy link

If this app is published in two tenants, the caching of _auth_method() will mean the same ClientCredentialsOauth2 object is used for both tenants. This causes an intermittent authentication error issue. If tenant A requests a token, it is set for tenant B, and vice versa, until it is refreshed.
This PR fixes that by passing the webhook.baseurl into _auth_method() thereby having a ClientCredentialsOauth2 object, per tenant, that is still cached as needed. There is no need to actually use webhook.baseurl, it is purely used for cache uniqueness.

If this app is published in two tenants, the caching of _auth_method() will mean the same ClientCredentialsOauth2 object is used for both tenants. This causes an intermittent authentication error issue. If tenant A requests a token, it is set for tenant B, and vice versa, until it is refreshed.
This commit fixes that by passing the baseurl into _auth_method thereby having a ClientCredentialsOauth2 object, per tenant, that is still cached as needed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant